﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Enterprise.Infrastructure;
namespace Enterprise.UI.Web.Manage.SysState
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {

            Enterprise.Service.User.UserLoginService logService = new Service.User.UserLoginService();
            logService.UserOut();
            Response.Clear();
            Response.Write("Web应用程序已经重启, 请点击此处<a href=\"" + Page.ResolveClientUrl("~/") + "Default.aspx\">重新登入</a>.");
            Response.Flush();
            Response.Close();
            HttpRuntime.UnloadAppDomain();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            IDictionaryEnumerator id = HttpRuntime.Cache.GetEnumerator();
            while (id.MoveNext())
            {
                DictionaryEntry abc = id.Entry;
                string Tempstring = (string)id.Key;
                HttpRuntime.Cache.Remove(Tempstring);
            }
            CacheHelper.Refresh();
            Response.Clear();
            Response.Write("Web应用程序已经重启, 请点击此处<a href=\"" + Page.ResolveClientUrl("~/") + "Default.aspx\">重新登入</a>.");
            Response.Flush();
            Response.Close();
        }
    }
}